'''
通过代码，将a2.txt构建成这种数据类型：
[{'序号':'1','部⻔门':Python,'⼈人数':30,'平均年年龄':26,'备注':'单身狗'},......] 
'''
with open(r"day04文件操作\作业\a2.txt", 'r', encoding='utf-8') as f:
    lst = []
    f1 = f.readline()
    a, b, c, d, e = f1.split()
    for i in f:
        a1, b1, c1, d1, e1 = i.split()
        dic = {a: a1, b: b1, c: c1, d: d1, e: e1}
        lst.append(dic)
    print(lst)